import fs from 'fs'
import path from 'path'

const docRoot = path.resolve(__dirname, '../../docs')
export const languages = ['zh-CN']

export const ensureLang = (lang: string) => `/${lang}`

export const getLang = (id: string) =>
    path.relative(docRoot, id).split(path.sep)[0]
